import request from "@/utils/request";
export interface User {
    _id: string;
    username: string;
    sex: string;
}
export const loginApi = (data: any) => {
    return request.post("/admin/login", data);
};
export const registerApi = (data: any) => {
    return request.post("/admin/login/register", data);
};
export const logoutApi = () => {
    return request.post("/admin/login/logout");
};
export const getUserInfoApi = () => request.get("/admin/login/userInfo");
export const getUserApi = () => request.get("/admin/manager");
export const createUserApi = (userInfo: Partial<User>) => request.post("/admin/manager", userInfo);
export const updateUserApi = (userInfo: Partial<User>) => request.patch("/admin/manager", userInfo);
export const deleteUserApi = (userInfo: Partial<User>) => request.delete("/admin/manager", { data: userInfo });
